#ifndef MESH_DATA_H
#define MESH_DATA_H

#include "Export.h"
#include "IResource.h"

namespace glow
{
	
class SHARED MeshData : public IResource
{	
	public :
	
		/**
		 * Create the MeshData
		 * \param filename , is the file to load
		 **/ 
		MeshData(std::string filename) : 
			IResource(filename), _vertices(NULL), _texcoords(NULL), _normals(NULL), _index(NULL),
			_nb_vertices(0), _nb_indices(0), _nb_texcoords(0), _nb_normals(0) {}
		
		/**
		 * Destroy the MeshData
		 **/ 
		~MeshData()
		{
			if(_vertices) delete[] _vertices;
			if(_texcoords) delete[] _texcoords;
			if(_normals) delete[] _normals;
		}
		
		float * _vertices ;
		float * _texcoords ;
		float * _normals;
		unsigned int * _index ;
		unsigned int _nb_vertices;
		unsigned int _nb_indices;
		unsigned int _nb_texcoords;
		unsigned int _nb_normals;

	private:

};

}		
    
#endif
 
